package com.dave.gd.sysmgr.domain.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import com.dave.gd.core.base.repository.RepositoryRegister;
import com.dave.gd.sysmgr.domain.repository.IPermissionRepository;


@Table(name = "el_permission")
public class Permission implements Serializable{//extends AbstractBaseEntity<Integer>


    /**
     * .
     */
    private static final long serialVersionUID = 6542890033442623399L;

    /**
     * 
     */
    @Id
    @Column(name = "id")
    private Integer id=0;

    /**
     * 是否使用（ISUSE，NOUSE）
     */
    @Column(name = "isused")
    private String isused;

    /**
     * 排序
     */
    @Column(name = "sort")
    private int sort;


    /**
     * closed/open
     */
    @Column(name = "state")
    private String state;

    /**
     * 创建者
     */
    @Column(name = "creater")
    private int creater;

    /**
     * 最后更改时间
     */
    @Column(name = "lastmod")
    private Timestamp lastmod;

    /**
     * 父节点id
     */
    @Column(name = "pid")
    private Integer pid;

    /**
     * 类型(F,函数)
     */
    @Column(name = "type")
    private String type;

    /**
     * 路径
     */
    @Column(name = "url")
    private String url;

    /**
     * 创建时间
     */
    @Column(name = "createtime")
    private Timestamp createtime;

    /**
     * 名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 修改者
     */
    @Column(name = "modifyer")
    private int modifyer;

    /**
     * 父节点名称
     */
    @Column(name = "pname")
    private String pname;

    /**
     * 小图标
     */
    @Column(name = "icons")
    private String icons;

    /**
     * 描述
     */
    @Column(name = "dsc")
    private String dsc;

    /**
     * shiro标志
     */
    @Column(name = "shiroid")
    private String shiroid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIsused() {
        return isused;
    }

    public void setIsused(String isused) {
        this.isused = isused;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }


    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public int getCreater() {
        return creater;
    }

    public void setCreater(int creater) {
        this.creater = creater;
    }

    public Timestamp getLastmod() {
        return lastmod;
    }

    public void setLastmod(Timestamp lastmod) {
        this.lastmod = lastmod;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getModifyer() {
        return modifyer;
    }

    public void setModifyer(int modifyer) {
        this.modifyer = modifyer;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getIcons() {
        return icons;
    }

    public void setIcons(String icons) {
        this.icons = icons;
    }

    public String getDsc() {
        return dsc;
    }

    public void setDsc(String dsc) {
        this.dsc = dsc;
    }

    public String getShiroid() {
        return shiroid;
    }

    public void setShiroid(String shiroid) {
        this.shiroid = shiroid;
    }

   

  /*  @Override
    public Integer getId() {
        return this.id;
    }

    @Override
    public void setId(Integer id) {
        this.id=id;
    }
    
    public static IPermissionRepository repository() {
        return (IPermissionRepository) RepositoryRegister.getInstance()
                .getRepository(PermissionEntity.class);
    }*/

}
